<%--
  Created by IntelliJ IDEA.
  User: liyong
  Date: 2010-4-8
  Time: 13:31:53
     添加广告商账户
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/pages/inc/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta name="decorator" content="default.index">
    <script type="text/javascript" src="/js/checkModifyInfo.js"></script>
    <style type="text/css">
        .tips-warning {
            display: none;
            float: left;
            margin-left: 5px;
        }
    </style>
    <script type="text/javascript">
        $(function() {

            $("#modifyInfo").click(function() {
                if (checkModifyInfo()) {
                    var userName = $("#userName").val();
                    var companyName = $("#companyName").val();
                    var legalName = $("#legalName").val();
                    var businessLicenseNo = $("#businessLicenseNo").val();
                    var contactName = $("#contactName").val();
                    var mobilePhone = $("#mobilePhone").val();
                    var companyAddress = $("#companyAddress").val();
                    var postCode = $("#postCode").val();
                    var fax = $("#fax").val();
                    var cardNo = $("#cardNo").val();
                    var websiteUrl = $("#websiteUrl").val();
                    $.ajax({
                        type: "POST",
                        url: "${ctx}/account/modifyinfo.aspx",
                        data: "userName=" + userName + "&companyName=" + companyName + "&legalName=" + legalName
                                + "&businessLicenseNo=" + businessLicenseNo + "&contactName=" + contactName + "&mobilePhone=" + mobilePhone
                                + "&companyAddress=" + companyAddress + "&postCode=" + postCode + "&fax=" + fax + "&cardNo=" + cardNo
                                + "&websiteUrl=" + websiteUrl,
                        dataType:"json",
                        success: function(msg) {
                            $(".popbg").css("height", $(document).height() + "px").css("width", document.documentElement.scrollWidth + "px").show();
                            $(".pop-content").css("left", $(document).width() / 2 - $('.pop-content').width() / 2 - 18 + "px");
                            $('.pop-content').show();
                        }
                    });
                }
            })
        })
    </script>
</head>

<body>
<div class="rightblock">
    <h3>修改企业信息</h3>

    <div class="allfield"><label><span>*</span>钱袋商户账号：</label>
        <%=session.getAttribute("username")%>
    </div>
    <div class="allfield"><label><span>*</span>企业名称：</label>
        <%--<input type="text" class="input-text" id="companyName" name="companyName"--%>
        <%--value="${partner.companyName}"/>--%>

        <%--<div class="tips-explain tips-warning">请输入企业名称</div>--%>
        <%--<span id="resultCompanyName"></span>--%>

        ${partner.companyName}
    </div>
    <div class="allfield"><label><span>*</span>企业法人：</label>
        <%--<input type="text" class="input-text" id="legalName" name="legalName" value="${partner.legalName}"/>--%>

        <%--<div class="tips-explain tips-warning">请输入法定代表人姓名</div>--%>
        <%--<span id="resultLegalName"></span>--%>

        ${partner.legalName}
    </div>
    <div class="allfield"><label><span>*</span>企业法人身份证号：</label>
       ${partner.legalIdNo}
    </div>
    <div class="allfield"><label><span>*</span>营业执照注册号：</label>
        <%--<input type="text" class="input-text"--%>
        <%--name="businessLicenseNo"--%>
        <%--id="businessLicenseNo" value="${partner.businessLicenseNo}"--%>
        <%--maxlength="30"/>--%>

        <%--<div class="tips-explain tips-warning">请输入营业执照注册号</div>--%>
        <%--<span id="resultBusinessLicenseNo"></span>--%>

        ${partner.businessLicenseNo}
    </div>
      <div class="allfield"><label><span>*</span>组织机构代码：</label>
          ${partner.organizationNo}
        </div>
     <div class="allfield"><label><span>*</span>经营范围：</label>
          ${partner.businessScope}
        </div>
     <div class="allfield"><label><span>*</span>营业期限：</label>
          ${partner.businessTerm}
        </div>
    <div class="dashedline"></div>
    <div class="allfield"><label><span>*</span>联系人（姓名）：</label>
        <input type="text" class="input-text"
               name="contantName"
               id="contactName" value="${partner.contactName}"/>

        <div class="tips-explain tips-warning">请输入联系人</div>
        <span id="resultContactName"></span>
    </div>
    <div class="allfield"><label><span>*</span>联系人电话：</label>
        <input type="text" class="input-text"
               id="mobilePhone"
               name="mobilePhone"
               value="${partner.mobilePhone}"
               maxlength="11"/>

        <div class="tips-explain tips-warning">请输入联系人手机号码</div>
        <span id="resultMobilePhone"></span>
    </div>
    <div class="allfield"><label>传真：</label>
        <input type="text" class="input-text"
               name="fax"
               id="fax" value="${partner.fax}"/>

        <div class="tips-explain tips-warning">请输入传真号码</div>
        <span id="resultFax"></span>
    </div>
    <div class="dashedline"></div>
    <div class="allfield"><label><span>*</span>地 址：</label>
        <input type="text" class="input-text"
               name="companyAddress"
               style="width:290px;" id="companyAddress"
               value="${partner.companyAddress}"/>

        <div class="tips-explain tips-warning">请输入公司所在地址</div>
        <span id="resultCompanyAddress"></span>
    </div>
    <div class="allfield"><label><span>*</span>邮 编：</label>
        <input type="text" class="input-text"
               name="postCode"
               id="postCode" value="${partner.postCode}" maxlength="6"/>

        <div class="tips-explain tips-warning">请输入所在地邮编</div>
        <span id="resultPostCode"></span>
    </div>
    <div class="dashedline"></div>

    <%--<div class="allfield"><label>身份证号：</label>--%>
    <%--<input type="text" class="input-text"--%>
    <%--name="cardNo"--%>
    <%--style="width:290px;" id="cardNo" value="${partner.idCardNo}"/>--%>

    <%--<div class="tips-explain tips-warning">请输入身份证号</div>--%>
    <%--<span id="resultCardNo"></span>--%>
    <%--</div>--%>
    <div class="allfield"><label>网 址：</label>
        <input type="text" class="input-text"
               name="websiteUrl"
               style="width:290px;" id="websiteUrl"
               value="${partner.returnUrl}"/>

        <div class="tips-explain tips-warning">请输入公司网址(以http://或https://开头)</div>
        <span id="resultWebsiteUrl"></span>
    </div>
    <div class="allfield sbm-button"><label>&nbsp;</label><span class="btn-right" style="width:60px;">
                <input type="button" value="保存" class="btn" style="width:60px;" id="modifyInfo"/>
            </span>
        <%--<label--%>
        <%--style="width:50px;">--%>
        <%--&nbsp;</label>--%>
        <%--<span class="cl-btn-right"><input type="button" value="返回" class="cl-btn"--%>
        <%--style="width:60px;"--%>
        <%--onclick="history.back();"/></span></div>--%>
        &nbsp;&nbsp;<a href="javascript:" onclick="history.back()">返回</a>
    </div>
</div>
</body>
</html>
